﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AllApplication.aspx.cs" Inherits="WXYW.AllApplication" %>

<asp:Content ID="content2" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    客户原始申请单
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox><asp:LinkButton
        ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton><asp:LinkButton
            ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
    <img src="image/operateicon/print.gif" alt="" />
    <a onclick="preview()">打印</a>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <!--startprint-->
    <asp:GridView ID="originalGridView" runat="server" CssClass="tableList" BorderWidth="1px"
        BorderColor="#888888" AutoGenerateColumns="False" AllowPaging="True" 
        PageSize="20" OnPageIndexChanging="originalGridView_PageIndexChanging"
        Width="100%" OnRowDataBound="originalGridView_RowDataBound" 
        onsorting="originalGridView_Sorting">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="流水号" DataField="RunningNumber" 
                SortExpression="RunningNumber" >
            <HeaderStyle Wrap="False" />
            <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="ApplicationCode" HeaderText="RMA/DOA#" 
                SortExpression="ApplicationCode" >
            <HeaderStyle Wrap="False" />
            <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="客户名称" SortExpression="User.FullName">
                <ItemTemplate>
                    <%#Eval("User.FullName")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="申请日期" SortExpression="ApplicationDateTime">
                <ItemTemplate>
                    <%#Convert.ToDateTime(Eval("ApplicationDateTime")).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="收货日期" SortExpression="ReceiveDateTime">
                <ItemTemplate>
                    <%#Convert.ToDateTime(Eval("ReceiveDateTime")).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="数量">
                <ItemTemplate>
                    <%#Eval("ApplicationProductHistory.Count")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="状态" DataField="Status" >
            <HeaderStyle Wrap="False" />
            <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <img src="image/operateicon/docview.gif" alt="" />
                    <asp:LinkButton ID="viewLinkButton" OnClick="viewLinkButton_click" CommandArgument='<%#Eval("ApplicationID") %>'
                        runat="server">详细</asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
             本类记录<span style="color: Red"><%= RecordsNumber%></span>条,
            <span style="color: Red">20</span>条/页 当前 <span style="color: Red">
                <%= Convert.ToInt32(Page.Session["PageIndex"])+ 1%>/<%= PageCount%></span>页
            <asp:LinkButton ID="LinkButton1" runat="server"
                Style="color: blue" onclick="LinkButton1_Click">首页</asp:LinkButton><asp:LinkButton 
                    ID="LinkButton2" runat="server" Style="color: blue" 
                onclick="LinkButton2_Click">|上一页</asp:LinkButton>
            <asp:LinkButton ID="LinkButton3" runat="server"
                Style="color: blue" onclick="LinkButton3_Click">下一页</asp:LinkButton><asp:LinkButton 
                    ID="LinkButton4" runat="server" Style="color: blue" 
                onclick="LinkButton4_Click">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
    <!--endprint-->
</asp:Content>
